/*************************************************************************
	> File Name: EP09-2.cpp
	> Author: 
	> Mail: 
	> Created Time: 
 ************************************************************************/
#include <iostream>
using namespace std;

int main() {
    int c;
    for (int a = 1; a <= 333; a++) {
        for (int b = a; b <= 500; b++) {
            c = 1000 - a - b;
            if ((a * a) + (b * b) != (c * c)) continue;
            cout << a * b * c << endl;
            break;
        }
    }
    return 0;
}
